Typically in a microprocessor, on-chip trace arrays are provided to capture data for debug of specific events or transactions. It also typically has built-in features like performance monitors to monitor and collect data for performance analysis.